package jpa.entitys.promis.construction;

import java.io.Serializable;

import javax.persistence.*;

import java.math.BigDecimal;
import java.util.Date;

import jpa.entitys.common.CommonEntity;


/**
 * The persistent class for the PURCHASE_REQUEST_ITEMS database table.
 * 
 */
@Entity
@Table(name="PURCHASE_REQUEST_ITEMS")
@NamedQueries({
    @NamedQuery(name = "PurchaseRequestItem.findAll", query = " SELECT c FROM PurchaseRequestItem c "),
    @NamedQuery(name = "PurchaseRequestItem.findById", query = " SELECT c FROM PurchaseRequestItem c WHERE c.id = :Id "),
    @NamedQuery(name = "PurchaseRequestItem.findBy6Key", query = " SELECT c FROM PurchaseRequestItem c WHERE c.id.company = :company And c.id.project = :project And c.id.porType = :porType And c.id.porSeries = :porSeries And c.id.porNo = :porNo And c.id.porSeqNo = :porSeqNo ")
})
public class PurchaseRequestItem extends CommonEntity implements Serializable {
	private static final long serialVersionUID = 1L;

	@EmbeddedId
	private PurchaseRequestItemPK id;
	
	@Override public String toString() { return org.apache.commons.lang.builder.ToStringBuilder.reflectionToString(this);}

	@Column(name="ACCOUNT_CODE", length=30)
	private String accountCode;

	@Column(name="ACT_CODE", length=30)
	private String actCode;

	@Column(name="ACT_GRP_CODE", length=30)
	private String actGrpCode;

	@Column(name="ACT_SUB_GRP_CODE", length=30)
	private String actSubGrpCode;

	@Column(name="ACTIVE_STATUS", length=2)
	private String activeStatus;

	@Column(name="APPROXIMATE_ITEM_RATE", precision=16, scale=4)
	private BigDecimal approximateItemRate;

	@Column(name="ART_DESC", length=300)
	private String artDesc;

	@Column(name="ARTICLE_GROUP", length=30)
	private String articleGroup;

	@Column(name="ARTICLE_SUB_GROUP", length=30)
	private String articleSubGroup;

	@Column(name="BALANCE_AMT", precision=16, scale=2)
	private BigDecimal balanceAmt;

	@Column(name="BALANCE_BUDGET", precision=22)
	private BigDecimal balanceBudget;

	@Column(name="BALANCE_QTY", precision=16, scale=2)
	private BigDecimal balanceQty;

	@Column(name="BOQ_CODE", length=30)
	private String boqCode;

	@Column(name="BOQ_ITEM", length=30)
	private String boqItem;

	@Column(name="BOQ_SERIAL", precision=22)
	private BigDecimal boqSerial;

	@Column(name="BOQ_TYPE", length=30)
	private String boqType;

	@Column(name="BUDGET_CODE", length=30)
	private String budgetCode;

	@Column(name="BUDGET_REVISION", precision=22)
	private BigDecimal budgetRevision;

	@Column(name="COST_CODE", length=30)
	private String costCode;

	@Column(name="CREATED_BY")
	private String createdBy;

    @Temporal( TemporalType.TIMESTAMP)
	@Column(name="CREATED_ON")
	private Date createdOn;

	@Column(length=3)
	private String currency;

	@Column(name="CUSTOMER_CODE", length=30)
	private String customerCode;

	@Column(name="DEPARTMENT_CODE", length=30)
	private String departmentCode;

	@Column(name="DISCOUNT_AMOUNT", precision=22)
	private BigDecimal discountAmount;

	@Column(name="DISCOUNT_PERCENT", precision=22)
	private BigDecimal discountPercent;

	@Column(name="ENFORCE_QTY", length=2)
	private String enforceQty;

	@Column(name="ENFORCE_VALUE", length=2)
	private String enforceValue;

	@Column(name="EXCHANGE_RATE", precision=12, scale=8)
	private BigDecimal exchangeRate;

	@Column(precision=22)
	private BigDecimal factor;

	@Column(length=1)
	private String foc;

	@Column(length=1)
	private String inuse;

	@Column(name="ITEM_CODE", length=30)
	private String itemCode;

	@Column(name="ITEM_PRICE", precision=16, scale=2)
	private BigDecimal itemPrice;

	@Column(name="ITEM_RATE", precision=16, scale=4)
	private BigDecimal itemRate;

	@Column(name="ITEM_TYPE", length=30)
	private String itemType;

	@Column(name="ITEM_UM", length=30)
	private String itemUm;

	@Column(name="ITEM_UM_QTY", precision=12, scale=3)
	private BigDecimal itemUmQty;

	@Column(name="ITEM_VALUE_FC", precision=16, scale=2)
	private BigDecimal itemValueFc;

	@Column(name="ITEM_VALUE_LC", precision=16, scale=2)
	private BigDecimal itemValueLc;

	@Column(name="LAST_UPD_BY")
	private String lastUpdBy;

    @Temporal( TemporalType.TIMESTAMP)
	@Column(name="LAST_UPD_ON")
	private Date lastUpdOn;

	@Column(name="LOCAL_IMPORT_FLAG", length=1)
	private String localImportFlag;

	@Column(name="NET_ITEM_PRICE", precision=22)
	private BigDecimal netItemPrice;

	@Column(name="NET_ITEM_PRICE_LC", precision=22)
	private BigDecimal netItemPriceLc;

	@Column(name="NET_ITEM_RATE", precision=22)
	private BigDecimal netItemRate;

	@Column(name="NEW_ITEM", length=2)
	private String newItem;

	@Column(name="PO_NO", precision=6)
	private BigDecimal poNo;

	@Column(name="PO_SEQ_NO", precision=3)
	private BigDecimal poSeqNo;

	@Column(name="PO_SERIES", length=4)
	private String poSeries;

	@Column(name="PO_TYPE", length=2)
	private String poType;

    @Temporal( TemporalType.TIMESTAMP)
	@Column(name="POR_DATE")
	private Date porDate;

	@Column(name="POSTING_TYPE", length=1)
	private String postingType;

	@Column(name="PURCHASE_MATERIAL", length=1)
	private String purchaseMaterial;

	@Column(name="QUOTATION_FLAG", length=1)
	private String quotationFlag;

	@Column(name="REF_NO", precision=22)
	private BigDecimal refNo;

	@Column(name="REF_SEQ_NO", precision=22)
	private BigDecimal refSeqNo;

	@Column(name="REF_SERIES", length=4)
	private String refSeries;

	@Column(name="REF_TYPE", length=2)
	private String refType;

	@Column(length=2000)
	private String remarks;

    @Temporal( TemporalType.TIMESTAMP)
	@Column(name="REQUIRED_BY_DATE")
	private Date requiredByDate;

	@Column(precision=38)
	private BigDecimal revision;

	@Column(length=1)
	private String status;

	@Column(name="STORE_ID", length=30)
	private String storeId;

	@Column(name="SUB_ACCOUNT_CODE", length=30)
	private String subAccountCode;

	@Column(name="SUB_PROJECT", length=15)
	private String subProject;

	@Column(name="SUPPLIER_CODE", length=30)
	private String supplierCode;

	@Column(name="TAX_RATE", precision=22)
	private BigDecimal taxRate;

	@Column(name="TAX_TYPE", length=30)
	private String taxType;

	@Column(name="TYPE_OF_PURCHASE", length=10)
	private String typeOfPurchase;

	@Column(name="UNIT_QTY", precision=12, scale=3)
	private BigDecimal unitQty;

	@Column(name="UNITS_IN_PACK", precision=12, scale=3)
	private BigDecimal unitsInPack;

	@Column(name="VALUE_FC", precision=16, scale=2)
	private BigDecimal valueFc;

	@Column(name="VALUE_LC", precision=16, scale=2)
	private BigDecimal valueLc;

	@Column(name="VAT_AMOUNT_FC", precision=22)
	private BigDecimal vatAmountFc;

	@Column(name="VAT_AMOUNT_LC", precision=22)
	private BigDecimal vatAmountLc;
	
	@Column(name="SYNC_ISSTAGING", length=1)
	private String syncIsstaging;
	
	@Column(name="IS_INTERFACE")
	private String isInterface;
	
	@Column(name="CUMULATIVE_QTY")
	private BigDecimal cumulativeQty;

	/**
	 * @return the cumulativeQty
	 * Date =Nov 14, 2013 : 11:46:24 AM 
	 * CreateBy=Chatree Siangklom
	 * PurchaseRequestItem.java BigDecimal
	 * TODO
	 */
	public BigDecimal getCumulativeQty() {
		return this.cumulativeQty;
	}

	/**
	 * @param cumulativeQty the cumulativeQty to set
	 * Date =Nov 14, 2013 : 11:46:24 AM 
	 * CreateBy=Chatree Siangklom
	 *  PurchaseRequestItem.java BigDecimal
	 * TODO
	 */
	public void setCumulativeQty(BigDecimal cumulativeQty) {
		this.cumulativeQty = cumulativeQty;
	}

	public String getIsInterface() {
		return isInterface;
	}

	public void setIsInterface(String isInterface) {
		this.isInterface = isInterface;
	}
	
    /**
	 * @return the syncIsstaging
	 */
	public String getSyncIsstaging() {
		return syncIsstaging;
	}

	/**
	 * @param syncIsstaging the syncIsstaging to set
	 */
	public void setSyncIsstaging(String syncIsstaging) {
		this.syncIsstaging = syncIsstaging;
	}

	public PurchaseRequestItem() {
    }

	public PurchaseRequestItemPK getId() {
		return this.id;
	}

	public void setId(PurchaseRequestItemPK id) {
		this.id = id;
	}
	
	public String getAccountCode() {
		return this.accountCode;
	}

	public void setAccountCode(String accountCode) {
		this.accountCode = accountCode;
	}

	public String getActCode() {
		return this.actCode;
	}

	public void setActCode(String actCode) {
		this.actCode = actCode;
	}

	public String getActGrpCode() {
		return this.actGrpCode;
	}

	public void setActGrpCode(String actGrpCode) {
		this.actGrpCode = actGrpCode;
	}

	public String getActSubGrpCode() {
		return this.actSubGrpCode;
	}

	public void setActSubGrpCode(String actSubGrpCode) {
		this.actSubGrpCode = actSubGrpCode;
	}

	public String getActiveStatus() {
		return this.activeStatus;
	}

	public void setActiveStatus(String activeStatus) {
		this.activeStatus = activeStatus;
	}

	public BigDecimal getApproximateItemRate() {
		return this.approximateItemRate;
	}

	public void setApproximateItemRate(BigDecimal approximateItemRate) {
		this.approximateItemRate = approximateItemRate;
	}

	public String getArtDesc() {
		return this.artDesc;
	}

	public void setArtDesc(String artDesc) {
		this.artDesc = artDesc;
	}

	public String getArticleGroup() {
		return this.articleGroup;
	}

	public void setArticleGroup(String articleGroup) {
		this.articleGroup = articleGroup;
	}

	public String getArticleSubGroup() {
		return this.articleSubGroup;
	}

	public void setArticleSubGroup(String articleSubGroup) {
		this.articleSubGroup = articleSubGroup;
	}

	public BigDecimal getBalanceAmt() {
		return this.balanceAmt;
	}

	public void setBalanceAmt(BigDecimal balanceAmt) {
		this.balanceAmt = balanceAmt;
	}

	public BigDecimal getBalanceBudget() {
		return this.balanceBudget;
	}

	public void setBalanceBudget(BigDecimal balanceBudget) {
		this.balanceBudget = balanceBudget;
	}

	public BigDecimal getBalanceQty() {
		return this.balanceQty;
	}

	public void setBalanceQty(BigDecimal balanceQty) {
		this.balanceQty = balanceQty;
	}

	public String getBoqCode() {
		return this.boqCode;
	}

	public void setBoqCode(String boqCode) {
		this.boqCode = boqCode;
	}

	public String getBoqItem() {
		return this.boqItem;
	}

	public void setBoqItem(String boqItem) {
		this.boqItem = boqItem;
	}

	public BigDecimal getBoqSerial() {
		return this.boqSerial;
	}

	public void setBoqSerial(BigDecimal boqSerial) {
		this.boqSerial = boqSerial;
	}

	public String getBoqType() {
		return this.boqType;
	}

	public void setBoqType(String boqType) {
		this.boqType = boqType;
	}

	public String getBudgetCode() {
		return this.budgetCode;
	}

	public void setBudgetCode(String budgetCode) {
		this.budgetCode = budgetCode;
	}

	public BigDecimal getBudgetRevision() {
		return this.budgetRevision;
	}

	public void setBudgetRevision(BigDecimal budgetRevision) {
		this.budgetRevision = budgetRevision;
	}

	public String getCostCode() {
		return this.costCode;
	}

	public void setCostCode(String costCode) {
		this.costCode = costCode;
	}

	public String getCreatedBy() {
		return this.createdBy;
	}

	public void setCreatedBy(String createdBy) {
		this.createdBy = createdBy;
	}

	public Date getCreatedOn() {
		return this.createdOn;
	}

	public void setCreatedOn(Date createdOn) {
		this.createdOn = createdOn;
	}

	public String getCurrency() {
		return this.currency;
	}

	public void setCurrency(String currency) {
		this.currency = currency;
	}

	public String getCustomerCode() {
		return this.customerCode;
	}

	public void setCustomerCode(String customerCode) {
		this.customerCode = customerCode;
	}

	public String getDepartmentCode() {
		return this.departmentCode;
	}

	public void setDepartmentCode(String departmentCode) {
		this.departmentCode = departmentCode;
	}

	public BigDecimal getDiscountAmount() {
		return this.discountAmount;
	}

	public void setDiscountAmount(BigDecimal discountAmount) {
		this.discountAmount = discountAmount;
	}

	public BigDecimal getDiscountPercent() {
		return this.discountPercent;
	}

	public void setDiscountPercent(BigDecimal discountPercent) {
		this.discountPercent = discountPercent;
	}

	public String getEnforceQty() {
		return this.enforceQty;
	}

	public void setEnforceQty(String enforceQty) {
		this.enforceQty = enforceQty;
	}

	public String getEnforceValue() {
		return this.enforceValue;
	}

	public void setEnforceValue(String enforceValue) {
		this.enforceValue = enforceValue;
	}

	public BigDecimal getExchangeRate() {
		return this.exchangeRate;
	}

	public void setExchangeRate(BigDecimal exchangeRate) {
		this.exchangeRate = exchangeRate;
	}

	public BigDecimal getFactor() {
		return this.factor;
	}

	public void setFactor(BigDecimal factor) {
		this.factor = factor;
	}

	public String getFoc() {
		return this.foc;
	}

	public void setFoc(String foc) {
		this.foc = foc;
	}

	public String getInuse() {
		return this.inuse;
	}

	public void setInuse(String inuse) {
		this.inuse = inuse;
	}

	public String getItemCode() {
		return this.itemCode;
	}

	public void setItemCode(String itemCode) {
		this.itemCode = itemCode;
	}

	public BigDecimal getItemPrice() {
		return this.itemPrice;
	}

	public void setItemPrice(BigDecimal itemPrice) {
		this.itemPrice = itemPrice;
	}

	public BigDecimal getItemRate() {
		return this.itemRate;
	}

	public void setItemRate(BigDecimal itemRate) {
		this.itemRate = itemRate;
	}

	public String getItemType() {
		return this.itemType;
	}

	public void setItemType(String itemType) {
		this.itemType = itemType;
	}

	public String getItemUm() {
		return this.itemUm;
	}

	public void setItemUm(String itemUm) {
		this.itemUm = itemUm;
	}

	public BigDecimal getItemUmQty() {
		return this.itemUmQty;
	}

	public void setItemUmQty(BigDecimal itemUmQty) {
		this.itemUmQty = itemUmQty;
	}

	public BigDecimal getItemValueFc() {
		return this.itemValueFc;
	}

	public void setItemValueFc(BigDecimal itemValueFc) {
		this.itemValueFc = itemValueFc;
	}

	public BigDecimal getItemValueLc() {
		return this.itemValueLc;
	}

	public void setItemValueLc(BigDecimal itemValueLc) {
		this.itemValueLc = itemValueLc;
	}

	public String getLastUpdBy() {
		return this.lastUpdBy;
	}

	public void setLastUpdBy(String lastUpdBy) {
		this.lastUpdBy = lastUpdBy;
	}

	public Date getLastUpdOn() {
		return this.lastUpdOn;
	}

	public void setLastUpdOn(Date lastUpdOn) {
		this.lastUpdOn = lastUpdOn;
	}

	public String getLocalImportFlag() {
		return this.localImportFlag;
	}

	public void setLocalImportFlag(String localImportFlag) {
		this.localImportFlag = localImportFlag;
	}

	public BigDecimal getNetItemPrice() {
		return this.netItemPrice;
	}

	public void setNetItemPrice(BigDecimal netItemPrice) {
		this.netItemPrice = netItemPrice;
	}

	public BigDecimal getNetItemPriceLc() {
		return this.netItemPriceLc;
	}

	public void setNetItemPriceLc(BigDecimal netItemPriceLc) {
		this.netItemPriceLc = netItemPriceLc;
	}

	public BigDecimal getNetItemRate() {
		return this.netItemRate;
	}

	public void setNetItemRate(BigDecimal netItemRate) {
		this.netItemRate = netItemRate;
	}

	public String getNewItem() {
		return this.newItem;
	}

	public void setNewItem(String newItem) {
		this.newItem = newItem;
	}

	public BigDecimal getPoNo() {
		return this.poNo;
	}

	public void setPoNo(BigDecimal poNo) {
		this.poNo = poNo;
	}

	public BigDecimal getPoSeqNo() {
		return this.poSeqNo;
	}

	public void setPoSeqNo(BigDecimal poSeqNo) {
		this.poSeqNo = poSeqNo;
	}

	public String getPoSeries() {
		return this.poSeries;
	}

	public void setPoSeries(String poSeries) {
		this.poSeries = poSeries;
	}

	public String getPoType() {
		return this.poType;
	}

	public void setPoType(String poType) {
		this.poType = poType;
	}

	public Date getPorDate() {
		return this.porDate;
	}

	public void setPorDate(Date porDate) {
		this.porDate = porDate;
	}

	public String getPostingType() {
		return this.postingType;
	}

	public void setPostingType(String postingType) {
		this.postingType = postingType;
	}

	public String getPurchaseMaterial() {
		return this.purchaseMaterial;
	}

	public void setPurchaseMaterial(String purchaseMaterial) {
		this.purchaseMaterial = purchaseMaterial;
	}

	public String getQuotationFlag() {
		return this.quotationFlag;
	}

	public void setQuotationFlag(String quotationFlag) {
		this.quotationFlag = quotationFlag;
	}

	public BigDecimal getRefNo() {
		return this.refNo;
	}

	public void setRefNo(BigDecimal refNo) {
		this.refNo = refNo;
	}

	public BigDecimal getRefSeqNo() {
		return this.refSeqNo;
	}

	public void setRefSeqNo(BigDecimal refSeqNo) {
		this.refSeqNo = refSeqNo;
	}

	public String getRefSeries() {
		return this.refSeries;
	}

	public void setRefSeries(String refSeries) {
		this.refSeries = refSeries;
	}

	public String getRefType() {
		return this.refType;
	}

	public void setRefType(String refType) {
		this.refType = refType;
	}

	public String getRemarks() {
		return this.remarks;
	}

	public void setRemarks(String remarks) {
		this.remarks = remarks;
	}

	public Date getRequiredByDate() {
		return this.requiredByDate;
	}

	public void setRequiredByDate(Date requiredByDate) {
		this.requiredByDate = requiredByDate;
	}

	public BigDecimal getRevision() {
		return this.revision;
	}

	public void setRevision(BigDecimal revision) {
		this.revision = revision;
	}

	public String getStatus() {
		return this.status;
	}

	public void setStatus(String status) {
		this.status = status;
	}

	public String getStoreId() {
		return this.storeId;
	}

	public void setStoreId(String storeId) {
		this.storeId = storeId;
	}

	public String getSubAccountCode() {
		return this.subAccountCode;
	}

	public void setSubAccountCode(String subAccountCode) {
		this.subAccountCode = subAccountCode;
	}

	public String getSubProject() {
		return this.subProject;
	}

	public void setSubProject(String subProject) {
		this.subProject = subProject;
	}

	public String getSupplierCode() {
		return this.supplierCode;
	}

	public void setSupplierCode(String supplierCode) {
		this.supplierCode = supplierCode;
	}

	public BigDecimal getTaxRate() {
		return this.taxRate;
	}

	public void setTaxRate(BigDecimal taxRate) {
		this.taxRate = taxRate;
	}

	public String getTaxType() {
		return this.taxType;
	}

	public void setTaxType(String taxType) {
		this.taxType = taxType;
	}

	public String getTypeOfPurchase() {
		return this.typeOfPurchase;
	}

	public void setTypeOfPurchase(String typeOfPurchase) {
		this.typeOfPurchase = typeOfPurchase;
	}

	public BigDecimal getUnitQty() {
		return this.unitQty;
	}

	public void setUnitQty(BigDecimal unitQty) {
		this.unitQty = unitQty;
	}

	public BigDecimal getUnitsInPack() {
		return this.unitsInPack;
	}

	public void setUnitsInPack(BigDecimal unitsInPack) {
		this.unitsInPack = unitsInPack;
	}

	public BigDecimal getValueFc() {
		return this.valueFc;
	}

	public void setValueFc(BigDecimal valueFc) {
		this.valueFc = valueFc;
	}

	public BigDecimal getValueLc() {
		return this.valueLc;
	}

	public void setValueLc(BigDecimal valueLc) {
		this.valueLc = valueLc;
	}

	public BigDecimal getVatAmountFc() {
		return this.vatAmountFc;
	}

	public void setVatAmountFc(BigDecimal vatAmountFc) {
		this.vatAmountFc = vatAmountFc;
	}

	public BigDecimal getVatAmountLc() {
		return this.vatAmountLc;
	}

	public void setVatAmountLc(BigDecimal vatAmountLc) {
		this.vatAmountLc = vatAmountLc;
	}

}